﻿@model EntryImageElementViewModel

<div>
	@Resources.Image
	@{ 
		this.Html.RenderPartial("EditRemoveElement", this.Model.Order); 
	}
</div>
<div class="editImage">
	<span>@Resources.Uri</span>
	<textarea rows="0" cols="0" name="@string.Concat(Model.InputPrefix, "imageUri")" class="imageUri @(this.Model.IsImageUriValid ? "" : "errorInput")">@this.Model.ImageUri</textarea>
	<button type="submit" name="action" value="@string.Format("{0}_{1}", EntryEditActionType.UseImage, this.Model.Order)" class="linkButton" title="@Resources.ShowImageFromUri">@Resources.Show</button>

	@if (!string.IsNullOrWhiteSpace(this.Model.ImageUri))
	{
		<div class="entryImage">
			<img alt="@this.Model.Title" src="@this.Model.ImageUri" title="@this.Model.Title" />
		</div>
	}
	<div>
		<span>@Resources.Title</span>
		<textarea rows="0" cols="0" name="@string.Concat(Model.InputPrefix, "imageTitle")" class="imageTitle @(this.Model.IsTitleValid ? "" : "errorInput")">@this.Model.Title</textarea>
	</div>
</div>
<div>
	@{ this.Html.RenderPartial("EditCommands", this.Model.Order); }
</div>